xiaoming = { 
    "name":"小明",
    "age":18,
    "gender":True
}

print(xiaoming["name"]) # 取值
xiaoming["gender"] = False # 修改值
xiaoming["weight"] = 58.2 # 增加键值对

xiaoming.pop("age") # 删除指定值

temp_dict = {
    "money":250,
    "weight":100    
}

xiaoming.update(temp_dict) # 合并字典数据， 当被合并字典与原有字典有相同的键值对时，会覆盖原有的键值对

# for key in obj 遍历
for k in xiaoming:
    print('%s %s' % (k,xiaoming[k]))

xiaoming.clear()   # 清空数据

print(len(xiaoming)) # 统计字典的长度

print(xiaoming)